<template>
	<view class="page">
		<view class="head">
			10月3日晚八点羽毛球场
		</view>
		<view class="comments">
			<view class="comm-item" v-for="(comm, ind) in commonts" :key="ind">
				<view class="title">
					<view class="author">
						{{comm.author}}
					</view>
					<view class="time">
						 {{comm.time}}
					</view>
				</view>
				<view class="comment">
					{{comm.comment}}
				</view>
				<view class="pic-boxs">
					<image class="pic" :src="comm.pic" mode=""></image>
				</view>
			</view>
			<view class="but-box">
				<button class="comm-butt">留言</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				commonts: [{author: '微微', time: '2019-10-3  22:49',
				comment: '今天的活动非常给力，XXX打得太厉害了。下回我要和他PKXX下回我要和他PKXXXXX',
				pic: '../../../static/img/user.png'},
				{author: '微微', time: '2019-10-3  22:49',
				comment: '今天的活动非常给力，XXX打得太厉害了。下回我要和他PKXX下回我要和他PKXXXXX',
				pic: '../../../static/img/user.png'}]
			}
		},
		onLoad(params) {
			var spaceId = params.id;
			this.spaceId = spaceId;
		},
		methods: {
			getSpaceComment(){
				this.$apis.getSpaceComment({spaceId: this.spaceId}).then((res) => {
					this.commonts = res;
				});
			}
		}
	}
</script>

<style>
	@import url("spaceInfo.css");
</style>
